package scala

class Practice {
    def main(args: Array[String]) {
      println("hello scala,hello world!")
      //定义数组
      var myList = Array(1.9, 2.9, 3.4, 3.5)
      //循环遍历
      for(item <- myList) {
        println(item)
      }
      var total = 0.0

      for(i <- 0 to(myList.length -1)) {
        total += myList(i)
      }

    }
}
